import request from '@/utils/request'

// 查询商品分类列表
export function listClassifyMain(query) {
  return request({
    url: '/classify/classifyMain/list',
    method: 'get',
    params: query
  })
}

export function tableClassify(query){
  return request({
    url: '/classify/classifyMain/tableList',
    method: 'get',
    params: query
  })
}

// 查询商品分类详细
export function getClassifyMain(id) {
  return request({
    url: '/classify/classifyMain/' + id,
    method: 'get'
  })
}

// 新增商品分类
export function addClassifyMain(data) {
  return request({
    url: '/classify/classifyMain',
    method: 'post',
    data: data
  })
}

// 修改商品分类
export function updateClassifyMain(data) {
  return request({
    url: '/classify/classifyMain',
    method: 'put',
    data: data
  })
}

// 删除商品分类
export function delClassifyMain(id) {
  return request({
    url: '/classify/classifyMain/' + id,
    method: 'delete'
  })
}
